package com.itheima.HomeWork.Work2;
/*
请定义教师类（Teacher），属性包括姓名和工号。
要求分别使用空参和有参构造方法创建对象，空参创建的对象通过setXxx赋值，
有参创建的对象直接赋值。定义教课（teach）方法，输出“工号为xxx的xxx老师正在讲课”。
 */
public class Teacher {
    private String name;
    private  String workID;

    public Teacher() {
    }

    public Teacher(String name, String workID) {
        this.name = name;
        this.workID = workID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWorkID() {
        return workID;
    }

    public void setWorkID(String workID) {
        this.workID = workID;
    }
    public void teach(){
        System.out.println("工号为"+workID+"的"+name+"老师正在讲课");
    }
}
